package pt.ua.miect.sd.simuladorpesca.entities;


public class RadioMessage {

    /**
     * @return the position
     */
    public MapPosition getPosition() {
        return position;
    }
        public enum MessageType  {FoundFish,FishAt,EndOfSeason,SeasonStart,AtHome,CastNet,RetriveNet,Abort, JoinCatch,Acknowledge};

    private String senderID;
	private String receiverID; //if -1 then message is for the whole fleet
	private MessageType message;
        private MapPosition position;
	
	/**
	 * Sends Message to the whole fleet
	 * @param sender Id of the boat that is send the message
	 * @param msg content of the message
	 */
	public RadioMessage(String sender, String receiver, MessageType msg)
	{
            this.senderID = sender;
            this.receiverID = receiver;
            this.message = msg;
            position = null;
	}

        public RadioMessage(String sender, String receiver, MessageType msg, MapPosition pos)
	{
            this.senderID = sender;
            this.receiverID = receiver;
            this.message = msg;
            position = pos;
	}
	

	/**
	 * @param message the message to set
	 */
	protected void setMessage(MessageType message) {
		this.message = message;
	}

	/**
	 * @return the message
	 */
	public MessageType getMessage() {
		return message;
	}

	/**
	 * @param senderID the senderID to set
	 */
	protected void setSenderID(String senderID) {
		this.senderID = senderID;
	}

	/**
	 * @return the senderID
	 */
	public String getSenderID() {
		return senderID;
	}

	/**
	 * @param receiverID the receiverID to set
	 */
	protected void setReceiverID(String receiverID) {
		this.receiverID = receiverID;
	}

	/**
	 * @return the receiverID
	 */
	public String getReceiverID() {
		return receiverID;
	}

}
